package com.hudongwx.food.fargment;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.hudongwx.food.R;
import com.hudongwx.food.activity.ShouYeTiaoZhuanActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.x;

/**
 * 购物
 * A simple {@link Fragment} subclass.
 */
@ContentView(R.layout.fragment_shopping)
public class ShoppingFragment extends Fragment {
    private View view;
    private Button btn;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if (null == view) {
            view = x.view().inject(this, inflater, container);
        }
        btn = (Button) view.findViewById(R.id.shopping_btn);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(getActivity(), ShouYeTiaoZhuanActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }

}
